package com.bank.backend.boot.server.converter;

import com.bank.backend.boot.base.model.dto.AccountDTO;
import com.bank.backend.boot.base.model.entity.Account;
import com.bank.backend.boot.base.model.vo.AccountVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author jiaowei
 * @since 2025/3/30 14:47
 */
@Mapper(componentModel = "spring")
public interface AccountConverter {
    AccountConverter INSTANCE = Mappers.getMapper(AccountConverter.class);

    Account convert(AccountDTO accountDTO);

    AccountVO convert(Account account);

    List<AccountVO> convert(List<Account> accountList);

    Page<AccountVO> convert(Page<Account> accountPage);
}
